<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Веб-клиент для ТМРадио</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Веб-клиент для ТМРадио. Web-client for TMRadio tmradio.net">
    <meta name="author" content="hakimovis@yandex.ru">
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>

    <!-- Le styles -->
    <link href="/css/bootstrap.css" rel="stylesheet">
    <link href="/css/tmrweb.css" rel="stylesheet">
    <link href="/css/timerbanner.css" rel="stylesheet">
    <link href="/css/twitter.css" rel="stylesheet">
    <style type="text/css">
      body {
        padding-top: 60px;
        padding-bottom: 40px;
      }
      .sidebar-nav {
        padding: 9px 0;
      }
    </style>
    <link href="/css/bootstrap-responsive.css" rel="stylesheet">

    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!--link rel="shortcut icon" href="/ico/favicon.ico"-->
    {% block head %}
    {% endblock %}
  </head>

  <body>

    <div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container-fluid">

          <!-- кнопка, которая появляется, когда окно узкое -->
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>

          <a class="brand" href="http://tmrweb.ikito.ru">TMRadio-Web</a>
          <!-- Юзеринфо справа -->
          <div class="btn-group pull-right">
            <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
              <i class="icon-user"></i> {% if user_profile %} {{ user_profile }} {% else %} Гость {% endif %}
              <span class="caret"></span>
            </a>
            <ul class="dropdown-menu">
              {% if user %}
              <li><a href="{% url editprofile %}">Профиль</a></li>
              <li class="divider"></li>
              <li><a href="{% url users_logout %}">Выйти</a></li>
              {% else %}
              <li><a href="{% url login_variants %}">Войти</a></li>
              {% endif %}
            </ul>
            {% if user %}
            <img src="{{user_profile.photo}}" class="pull-right" style="height: 28px; margin: 0 4px 0 2px">
            {% endif %}

          </div>
          <!-- конец юрезинфо -->

          <div class="nav-collapse">
            <ul class="nav">
{% for one in main_menu %}
          <li>
              <a href="{{one.url}}" title="{{one.title}}" {% if one.right %}class="al_right"{% endif %}> {{one.name}} </a>
              {% comment %}
              {% if one.submenu %}
                <ul class="submenu">
                  {% for sub in one.submenu %}
                    <li><a href="{{sub.url}}" title="{{sub.title}}">{{sub.name}}</a></li>
                  {% endfor %}
                </ul>
              {% endif %}
              {% endcomment %}
          </li>
{% endfor %}
            </ul>
          </div><!--/.nav-collapse -->

        </div>
      </div>
    </div>

    <div class="container-fluid">

      {% if messages %}
      <ul class="messages">
          {% for message in messages %}
          <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
          {% endfor %}
      </ul>
      {% endif %}
      {% if errors %}
      <ul class="errors">
          {% for error in errors %}
          <li{% if error.tags %} class="{{ error.tags }}"{% endif %}>{{ error }}</li>
          {% endfor %}
      </ul>
      {% endif %}

      <div class="row-fluid">
        <div class="span9">
          <h1>{{ title }}</h1>
          {% block content %}
              
          {% endblock %}
        </div><!--/span-->

        <div class="span3">
          <div class="well sidebar-nav">
            <ul class="nav nav-list">
              {% block sidebar %}
              {% endblock %}
              <li class="nav-header">Метрика</li><li>{% include 'yametrics.html' %}</li>
            </ul>
          </div><!--/.well -->
        </div><!--/span-->


      </div><!--/row-->

      <hr>

      <footer class="footer span12">
        <p>&copy; Сделано для <a href="http://tmradio.net">Тоже Мне Радио</a>, 2011-2012.
        Спасибо Umonkey, Хасан Атаман, Russian_rubyist за советы и тестирование.</p>
      </footer>

    </div><!--/.fluid-container-->
    <script src="/js/bootstrap-collapse.js"></script>
    <script src="/js/bootstrap-dropdown.js"></script>

  </body>
</html>
